# Product name: SeoMonster - OnPage SEO Raporting Script
# Author: George Damian - ic0de  (QwebDev.eu)
# Release date: 12 April 13
# Product link: http://codecanyon.net/item/seomonster-onpage-seo-raporting-script/4508909
# Version: 1.6

==============================How to update===============================

*Note: Before the update, you should make a backup of your files, in case of anything goes
wrong in the updating process.

=> [Update from 1.5 TO 1.6]

Files to be deteted: None
Files to be added:   None
Files to be edited: index.php, analyser.php, php/core.php, php/core.php, php/footer.php


In order to update from version 1.5 to 1.6, you just need to replace the following files:

index.php, analyser.php, php/core.php, php/core.php, php/footer.php

And that`s pretty much all.


=> [Update from 1.4 TO 1.5]

Files to be deteted: js/bootstrap-tabs.js
Files to be added:   img/favicon.ico
Files to be edited: php/header.php, php/core.php, index.php, analyser.php

In order to update from version 1.4 to version 1.5, you can either replace all of the files from
your server with the newer ones (from the "Script" folder). If you do so, don`t forget to edit the
config.php file again, or just don`t replace it in the first place. If you chose to update it manually
because you made any changes to the script you don`t want to lose, you can update it by
editing, adding and deleting the following files:


------------------------------------------------------> php/header.php <------------------------------------------------

*Removed code:

<script src="js/bootstrap-tabs.js"></script>
<script>
$(document).ready(function() {

	$('.tabs button').click(function(){
		switch_tabs($(this));
	});
 
	switch_tabs($('.defaulttab'));
 
});
function switch_tabs(obj)
{
	$('.tab-content').hide();
	$('.tabs button').removeClass("selected");
	var id = obj.attr("rel");
 
	$('#'+id).show();
	obj.addClass("selected");
}
</script>

*Added code:

<link rel="icon" href="img/favicon.ico" type="image/x-icon" />

------------------------------------------------------> php/core.php <------------------------------------------------

*Modified Code: (replace the code between line 455 and 505 with the next one)


$pageData = get($url);

    $str = $pageData;

    $str = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $str);
    $str = str_replace(array("\r","\rn","\n"),'',$str);
    $str = strip_tags($str);
    $str = preg_replace("/[^A-Za-z0-9 .,\"]/", '', $str);
    $strtemp = array();
    foreach(explode(' ',$str) as $word){
        if(strlen($word) != 0){

            $strtemp[] = $word;

        }
    }

    $pageData = implode(' ',$strtemp);

    if(isset($pageData) && !empty($pageData)){
        $contentlenght = strlen($pageData);
        $contentwords  = str_word_count($pageData);
        $kwincontent   = '';
        if($contentlenght < 150){
            $contentlenght = '<span class="label label-success" style="background-color: rgb(248, 148, 6); color: rgb(255, 255, 255); padding: 1px 3px 1px; font-size: 11px;">'. $contentlenght .' (Bad, not enough)</span>';

        }
         elseif($contentlenght >= 151 && $contentlenght <= 299){
            $contentlenght = '<span class="label label-success" style="background-color: rgb(248, 148, 6); color: rgb(255, 255, 255); padding: 1px 3px 1px; font-size: 11px;">'. $contentlenght .' (Ok)</span>';

        }
        elseif($contentlenght > 300){
             $contentlenght = '<span class="label label-success" style="background-color: rgb(70, 136, 71); color: rgb(255, 255, 255); padding: 1px 3px 1px; font-size: 11px;">'. $contentlenght .' (Perfect)</span>'; 
        }

        if($contentwords < 25){
            $contentwords = '<span class="label label-success" style="background-color: rgb(185, 74, 72); color: rgb(255, 255, 255); padding: 1px 3px 1px; font-size: 11px;"> '. $contentwords .' (Bad, not enough)</span>';
        }
        elseif($contentwords >= 26 && $contentwords <= 49){
            $contentwords = '<span class="label label-success" style="background-color: rgb(248, 148, 6); color: rgb(255, 255, 255); padding: 1px 3px 1px; font-size: 11px;"> '. $contentwords .' (Ok)</span>';
        }
        elseif($contentwords > 50){
         $contentwords = '<span class="label label-success" style="background-color: rgb(70, 136, 71); color: rgb(255, 255, 255); padding: 1px 3px 1px; font-size: 11px;"> '. $contentwords .' (Perfect)</span>';  
        }

         if($keywords != 'Not present'){
            $kwintitle = explode(',',$keywords);
            foreach($kwintitle as $kw){
            if(!empty($kw)){
                if(is_int(strpos(trim(strtolower($pageData)),trim(strtolower($kw))))){
                    $kwincontent .= '1';
                }
                else{
                    $kwincontent .= '0';
                }
            }
        }
        if(is_int(strpos($kwincontent,'1'))){
            $kwincontent = '<span class="label label-success" style="background-color: rgb(70, 136, 71); color: rgb(255, 255, 255); padding: 1px 3px 1px; font-size: 11px;"> Present</span>';
        }else{
             $kwincontent = '<span class="label label-success" style="background-color: rgb(185, 74, 72); color: rgb(255, 255, 255); padding: 1px 3px 1px; font-size: 11px;"> Not Present</span>';
       
        }
        $count = 0;
        
        
        
        foreach($kwintitle as $kw){
            if(is_int(strpos($pageData,  strtolower(trim($kw))))){
                $count = $count + substr_count($pageData,strtolower(trim($kw)));
            }
        }


---------------------------------------------------------> index.php <----------------------------------------------------

*Modified Code: (replace the code between line 30 and 32 with the next one)

<p>With our site,you can generate professional on page seo raeports for you and/or your clients.We offer you statistics about crawling,head elements,content,links,domain,url structure and much more.
      You can also check your site against certain keywords,to see how relevant your site is.Using this service,you can win a lot of new users,improve site quality so much more.
      Fill the box below with a valid site,and with some keywords (if you want) separated by a comma.
</p>

Added Code: (Anywhere in the <head></head> section) 

<link rel="icon" href="img/favicon.ico" type="image/x-icon" />

---------------------------------------------------------> analyser.php <----------------------------------------------------

*Added code: (Anywhere in the <head></head> section) 

<script>
$(document).ready(function() {

  $('.tabs button').click(function(){
    switch_tabs($(this));
  });
 
  switch_tabs($('.defaulttab'));
 
});
function switch_tabs(obj)
{
  $('.tab-content').hide();
  $('.tabs button').removeClass("selected");
  var id = obj.attr("rel");
 
  $('#'+id).show();
  obj.addClass("selected");
}
</script>


<link rel="icon" href="img/favicon.ico" type="image/x-icon" />


==========================================================================